<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>科技项目申报系统首页</title>
<link rel="stylesheet" href="<%=path%>/css/bootstrap.min.css" />
<link rel="stylesheet" href="<%=path%>/css/easyui.css" />
<style>
body {
	background-color: #f1f1f1;
}

.lightBg {
	background-color: #fff;
	padding: 10px 20px;
}

.infoDiv {
	color: orange;
}

.infoDiv p {
	margin-bottom: 5px;
}

.loginDiv {
	height: 240px;
	background-image: url("../images/banner_left.jpg");
	background-position: left;
}

.loginDiv .loginFormDiv {
	height: 240px;
	width: 280px;
	background-color: #a6e1ec;
	padding-top: 30px;
	padding-left: 10px;
	padding-right: 10px;
}

.banshitongdao {
	background-color: #fff;
}

.newsDiv {
	margin-top: 20px;
	background-color: #fff;
}

.contentDiv {
	padding-left: 25px;
	padding-right: 10px;
	background-color: #fff;
}
</style>

<script type="text/javascript">
	function check1() {
		var number = $("#LId").val();
		if (number
				.match(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/)
				|| number.match(/^\d{18}$/)
				|| number.match(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/)) {
			$("#login").attr("disabled", false);
		} else {
			alert("账号格式错误!\n请使用邮箱,18位组织机构号,或者8-16位数字组合");
			$("#login").attr("disabled", true);
		}
	}
</script>
<script type="text/javascript">
	function check2() {
		var number = $("#LId2").val();
		if (number
				.match(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/)
				|| number.match(/^\d{18}$/)
				|| number.match(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/)) {
			$("#login").attr("disabled", false);
		} else {
			alert("账号格式错误!\n请使用邮箱,18位组织机构号,或者8-16位数字组合");
			$("#login").attr("disabled", true);
		}
	}
</script>

</head>
<body>
	<div class="container">
		<div class="row lightBg">
			<!--标题-->
			<h2 class="pull-left">
				<img src="<%=path%>/images/logo.png" style="width: 80px;">
				智游科技项目申报系统
			</h2>
			<p class="pull-right" style="margin-top: 20px;">
				<button class="btn btn-warning">常见问题</button>
			</p>
		</div>
		<div class="infoDiv">
			<!--提示信息-->
			<p>
				<strong> 系统推荐：</strong>推荐使用火狐浏览器，邮箱推荐使用QQ邮箱。
			</p>
			<p>
				<strong>智游科技项目申报系统官方QQ群：</strong>522692967
			</p>
			<p>
				<strong>温馨提示：</strong>
				申报用户如有疑问可电话、QQ群、微信、现场等方式进行咨询。因近期申报期临近，咨询电话十分繁忙，如有占线，烦请加入申报系统官方QQ群
				 <br>关注“智游教育”微信公众号（zhiyou_group），业务及技术老师将进行答疑
			</p>
			
		</div>
		<div class="loginDiv">
			<!--登录div-->
			<div class="loginFormDiv pull-right">
				<form action="../user/toLogin">
					<h3>系统登录</h3>
					<div class="row">
						<div class="col-xs-4">用户名：</div>
						<div class="col-xs-8">
							<input type="text" name="LId" id="LId" onblur="check1()">
						</div>
					</div>
					<br>
					<div class="row">
						<div class="col-xs-4">密码：</div>
						<div class="col-xs-8">
							<input type="password" name="LPwd">
						</div>
					</div>
					<div><span style="color: red">${err }</span></div>
					<br>
					<div class="row text-center">
						<input class="btn btn-primary" type="submit" id="login" value="登录">
						&nbsp; <a href="../user/toReg" class="btn btn-primary">注册</a>
					</div>
					<div class="row text-center">
						<a href="<%=path%>/forget">忘记密码</a>
					</div>
				</form>
			</div>
		</div>

		<!-- 添加弹框的div -->
		<div class="banshitongdao">
			<!--办事通道-->
			<h3>办事通道</h3>
			<div id="tt" class="easyui-tabs">
				<div title="项目负责人" style="padding:10px" data-options="iconCls:'icon-help',closable:true">
					<p>▶
						<!-- 按照此模式进行添加操作,采用的是弹框的模式与模态框可能有差,供参考 -->
						<!-- <a href="">填写申报书</a> -->
						<a href="javascript:void(0)"
							onclick="$('#dlg').dialog('open').window('center');">填写申报书</a>

						&gt;填写合同书&gt;申请项目变更&gt;填写执行报告&gt;填写验收书
					</p>
					<p style="font-size: 9px;">备注仅做示例，不添加功能操作</p>
				</div>
				<div title="项目申报单位" style="padding:10px" data-options="iconCls:'icon-help',closable:true">
					<p>▶申报书审核&gt;合同书审核&gt;项目变更审核&gt;执行报告审核&gt;验收书审核&gt;负责人管理</p>
					<p style="font-size: 9px;">备注仅做示例，不添加功能操作</p>
				</div>
				<div title="政务窗口" data-options="iconCls:'icon-help',closable:true"
					style="padding:10px">
					<p>▶申报书受理&gt;合同书受理&gt;申报单位审核&gt;拨款收据受理</p>
					<p style="font-size: 9px;">备注仅做示例，不添加功能操作</p>
				</div>
			</div>
		</div>
		<div class=" newsDiv">
			<!--公告信息等管理-->
			<c:forEach items="${typeD }" var="type">
				<div class="col-xs-6">
					<div style="height: 20px;">
						<h4 class="pull-left">
							<strong>${type.TName }</strong>
						</h4>
						<a href="toNotices2?TId=${type.TId }" class="pull-right"
							style="margin-top: 10px;">更多&gt;&gt;&gt;</a>
					</div>
					<div class="clearfix"></div>
					<div class="contentDiv">
						<c:forEach items="${type.newses }" var="news" begin="0" end="2">
							<div class="row">
								<a href="toNoticesDetail?NId=${news.NId }">${news.NTitle }</a><span
									style="width: 80px;" class="pull-right"><fmt:formatDate
										value="${news.NTime }" /> </span>
							</div>
						</c:forEach>
					</div>
				</div>
			</c:forEach>
			<div id="dlg" class="easyui-dialog" title="登录提示"
				style="width:600px;height:300px;padding:16px"
				data-options="
			    closed:true
			">
				<%-- <form action="<%=path%>/user/toLogin"> --%>
				<form action="<%=path%>/user/toLogin" id="form1">
					<table>
						<thead>
							<tr>
								<td>请输入用户名:</td>
								<td><input name="LId" onblur="check2()" id="LId2" />
								</td>
							</tr>
							<tr>
								<td>请输入密码:</td>
								<td><input name="LPwd" type="password" />
								</td>
							</tr>
							<tr>
								<td><input type="submit" /> <input type="reset" />
								</td>
							</tr>
						</thead>
					</table>
				</form>
			</div>
		</div>
		<div class="clearfix"></div>
		<footer style="margin-top:40px;">
			<p class="text-center">版权归JAVA十期第一小组所有</p>
		</footer>

	</div>
	<script src="<%=path%>/js/jquery1.12.4.min.js"></script>
	<script src="<%=path%>/js/bootstrap.min.js"></script>
	<script src="<%=path%>/js/jquery.easyui.min.js"></script>
	<script type="text/javascript">
		$(function() {
			var tabs = $('#tt').tabs().tabs('tabs');
			for ( var i = 0; i < tabs.length; i++) {
				tabs[i].panel('options').tab.unbind().bind('mouseenter', {
					index : i
				}, function(e) {
					$('#tt').tabs('select', e.data.index);
				});
			}
		});
	</script>
	<%-- 	<script type="text/javascript"<%=path%>/js/jquery-3.3.1.js"></script>
	<script type="text/javascript">
		function save() {
			$
					.ajax({
						type : "POST",
						dataType : "json",
						url : "<%=path%>/user/toLogin2",
						data : $('#form1').serialize(),
						success : function(result) {
							if (result == '200') {
							alert();
								//location.href = '<%=path%>/user/toLogin';
							} ;
						},
						error : function() {
							alert('请检查填写格式,登陆失败');
						}
					});
		}
	</script> --%>

</body>
</html>